package com.jr.service.impl;

import com.jr.dao.BookDao;
import com.jr.dao.impl.BookDaoImpl;
import com.jr.entry.Book;
import com.jr.service.BookService;
import com.jr.util.PageHelper;


import java.util.ArrayList;

public class BookServiceImpl implements BookService {

    BookDao bookDao = new BookDaoImpl();

    @Override
    public ArrayList<Book> selectAll() {
        return bookDao.selectAll();
    }

    @Override
    public ArrayList<Book> selectQuery(Book book,PageHelper pageHelper) {
        return bookDao.selectQuery(book,pageHelper);
    }

    @Override
    public boolean insertBook(Book book) {

        return bookDao.insertBook(book);
    }

    @Override
    public boolean deleteBook(int bid) {
        return bookDao.deleteBook(bid);
    }

    @Override
    public Book selectById(int bid) {

        return bookDao.selectById(bid);

    }

    @Override
    public boolean updateBook(Book book) {
        return bookDao.updateBook(book);
    }

    @Override
    public int selectBookSize(Book book) {
        return bookDao.selectBookSize(book);
    }
}
